#
# Configuration file for the Mutt mail client
#
# This is an ongoing study on how to tune it perfectly the way I would like a 
# mail client to behave.
#

#-------------------------------------
# Account Hooks
#-------------------------------------
account-hook . 'unset imap_user imap_pass' # unset first!
account-hook 'imaps://mail.riseup.net' "\
              set imap_user=vesonoki@riseup.net"
account-hook 'imaps://mail.vivaldi.net' "\
              set imap_user=vesonoki@vivaldi.net"

#-------------------------------------
# Folders, mailboxes and folder hooks
#-------------------------------------

# Rise up:
set folder="imaps://vesonoki@mail.riseup.net/"
mailboxes =INBOX =Drafts =Sent
folder-hook 'imaps://vesonoki@mail.riseup.net' " \
        set     folder = imaps://mail.riseup.net \
                imap_user = 'vesonoki@riseup.net' \
                spoolfile = '+INBOX' \
                smtp_url = 'smtps://vesonoki@mail.riseup.net' \
                record = 'imaps://mail.riseup.net/Sent' \
                postponed = '+Drafts' \
                from = 'vesonoki@riseup.net'"

# Vivaldi2:
set folder="imaps://kzimmermann@mail.vivaldi.net/"
mailboxes =INBOX =Drafts =Sent
folder-hook 'imaps://kzimmermann@mail.vivaldi.net' " \
        set     folder = imaps://mail.vivaldi.net \
                imap_user = 'kzimmermann@vivaldi.net' \
                spoolfile = '+INBOX' \
                smtp_url = 'smtps://kzimmermann@mail.vivaldi.net' \
                record = 'imaps://mail.vivaldi.net/Sent' \
                postponed = '+Drafts' \
                from = 'Klaus Zimmermann <kzimmermann@vivaldi.net>'"

# Vivaldi:
set folder="imaps://vesonoki@mail.vivaldi.net/"
mailboxes =INBOX =Drafts =Sent
folder-hook 'imaps://vesonoki@mail.vivaldi.net' " \
        set     folder = imaps://mail.vivaldi.net \
                imap_user = 'vesonoki@vivaldi.net' \
                spoolfile = '+INBOX' \
                smtp_url = 'smtps://vesonoki@mail.vivaldi.net' \
                record = 'imaps://mail.vivaldi.net/Sent' \
                postponed = '+Drafts' \
                from = 'vesonoki@vivaldi.net'"


#
#-------------------------------------
# Macros to make life easier
#-------------------------------------
macro index <esc>1 "y1<return><return>" # ESC+1 takes to first INBOX
macro index <esc>2 "y5<return><return>" # ESC+2 takes to the second

# Common settings:
set timeout = 300
set editor='vim -c "set wrap" -c "set linebreak"'

# PGP setup
set crypt_replyencrypt
set crypt_replysign
set crypt_replysignencrypted
set pgp_show_unusable = no
set pgp_auto_decode = yes
